<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>窗体类事件</title>
    <style>
        body {
            height: 2000px;
        }
    </style>
</head>
<body>

</body>
<script>
    // onscroll
    // onload 页面都加载完后执行

    window.onscroll = function () {
        console.log(window.pageXOffset + " " + window.pageYOffset);
    }
</script>
</html>
